package ttOrder.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ttOrder.dao.OrderDAOImpl;
import ttOrder.model.Order;
import ttOrder.vo.OrderVO;

@Service
@Transactional
public class OrderServiceImpl implements IOrderService {
	
	@Autowired
	private OrderDAOImpl orderDAO;

	@Override
	public List<Order> findAllOrder(Integer id) {
		return orderDAO.findAllOrder(id);
	}

	@Override
	public Order getOrderById(Integer id) {
		return orderDAO.getOrderById(id);
	}

	@Override
	public void createOrder(Order order) throws Exception {
		
		orderDAO.createOrder(order);
	}

	@Override
	public void editOrder(Integer id) throws Exception {
		orderDAO.editOrder(id);
	}

	@Override
	public void deleteOrder(Integer id) throws Exception {
		orderDAO.deleteOrder(id);
	}

	@Override
	public void createOrderVO(OrderVO order) throws Exception {
		// TODO Auto-generated method stub
		orderDAO.createOrderVO(order);
	}



}
